Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aarch64 support #35

Merged
merged 20 commits into from
Dec 4, 2017
Merged

Add aarch64 support #35

merged 20 commits into from
Dec 4, 2017

Conversation

meyskens
Copy link
Contributor

This PR adds aarch64/arm64 build files for Debian stretch/jessie and Ubuntu Xenial and newer.
This PR is like #25 (sorry saw it right before sending this in) but uses the golang-backports apt repo till Go builds aarch64 binaries and is not only for Ubuntu Xenial.

I tested running the .deb on Debian Stretch. Any feedback welcome.

@douglasmiranda
Copy link

So, I'd like to share my experiences with packaging docker aarch on Pine64 running DietPI.

I tried to make deb with the Debian Jessie aarch Dockerfile, but with no success. So I changed the image to arm64v8/debian:jessie-backports. For Debian Jessie there is no aarch64 build on stable channel, only on backports.

As you can see here:

https://packages.debian.org/jessie/libseccomp-dev
https://packages.debian.org/jessie-backports/libseccomp-dev

More info:

Documented the steps here:
https://gist.github.com/douglasmiranda/41c582be2e216f09e1c1081a69e66f87


As you can see on my steps, I've cloned the /docker-ce repo no /docker-ce-packaging.

So my doubt is, the code from here will be merged on /docker-ce?


I hope I could help, please tell if there's a misconception from my part.

@douglasmiranda
Copy link

@meyskens
Copy link
Contributor Author

@douglasmiranda thx (sorry for the delay) will add backports on Jessie

@douglasmiranda
Copy link

xD Nice!

@@ -0,0 +1,28 @@
FROM multiarch/ubuntu-core:arm64-yakkety

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This for ubuntu zesty, so arm64-yakkety is incorrect image. I think using arm64v8/ubuntu:zesty is would be the best here. arm64v8/ seems to be the closest thing to official debian/ubuntu images and should probably be used elsewhere

# allow replacing httpredir or deb mirror
ARG APT_MIRROR=deb.debian.org
RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list
RUN echo "deb http://$APT_MIRROR/debian jessie-backports main" >> /etc/apt/sources.list

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps use arm64v8/debian:jessie-backports ?

@suihkulokki
Copy link

Generally looks good to me. I think using the arm64v8 namespace for base images would be an improvement.

@meyskens
Copy link
Contributor Author

meyskens commented Sep 4, 2017

@suihkulokki will do!

@suihkulokki
Copy link

Looks good to me now 👍

@DieterReuter
Copy link

Any progress here? I'd like to get Debian supported.
@meyskens you should at least resolve the conflict in file "detect_alpine_image".

@vielmetti
Copy link

I'd like to see this as well, echoing @DieterReuter - one of the desired endpoints for this is an arm64 build for the Raspberry Pi 3.

@justincormack
Copy link
Member

Needs a rebase

@meyskens
Copy link
Contributor Author

meyskens commented Oct 4, 2017

Rebase done

@@ -6,7 +6,9 @@ img="unknown"
if [ "$arch" = "x86_64" ]; then
img="alpine"
elif [ "$arch" = "armv7l" ]; then
img="arm32v6/alpine"
img="armhf/alpine"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR shouldn't change the behaviour for other platforms. Probably an artifact of other parallel merges. Upstream already contains the changes for armv7l and aarch64.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, that was the just solved merge conflict

@vielmetti
Copy link

It's worth noting that there is work in progress to get a multiarch Alpine image, per gliderlabs/docker-alpine#304 . That's not done yet, but when it is done this will simplify the logic.

@thaJeztah
Copy link
Member

ping @seemethere @andrewhsu @tianon PTAL

@@ -0,0 +1,28 @@
FROM aarch64/ubuntu:zesty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should be arm64v8/ubuntu as well. 👍

@@ -7,6 +7,8 @@ if [ "$arch" = "x86_64" ]; then
img="alpine"
elif [ "$arch" = "armv7l" ]; then
img="arm32v6/alpine"
elif [ "$arch" = "aarch64" ]; then
img="arm64v8/alpine"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block is already down a few lines 😄


RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev gnupg dirmngr --no-install-recommends && rm -rf /var/lib/apt/lists/*

ENV GO_VERSION 1.9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency across arches, this should still be 1.8.3, shouldn't it? (and they should all be updated together?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh duh, there weren't binary releases of Go for arm64 until 1.9 -- makes more sense. 😇

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that may be an issue still; we were holding off bumping to 1.9 as there were still some issues (possibly not for all architectures though); moby/moby#33892

@ericcurtin
Copy link

👍 Personally I'd be hoping to add fedora 27 support as it is creating disk images for lots of boards

docker/docker-install#40

Maybe I can take a peek at your work and get it done sometime!

@DieterReuter
Copy link

Hmm, I'm not quite sure why this PR is still pending. Do we really have any major concerns to merge it? Or what parts should be fixed to finally accept it? I'd really love to get this in!

@meyskens
Copy link
Contributor Author

@DieterReuter from my understanding it is Go 1.9 which is the first with official arm64 support. If wanted I can always build 1.8.x from source if 1.9 support is far away

@DieterReuter
Copy link

Yes maybe, but there is already a version for Ubuntu Xenial built witn Go 1.8.5, just see here https://github.com/docker/docker-ce-packaging/blob/master/deb/ubuntu-xenial/Dockerfile.aarch64.

@DieterReuter
Copy link

DieterReuter commented Oct 31, 2017

@meyskens wait, I think there is a new solution now! All the other .deb builds are now based upon Go v1.8.5 and actually there is a new pre-built Go v1.8.5 tarball available for armv8! Here it is https://redirector.gvt1.com/edgedl/go/go1.8.5.linux-arm64.tar.gz. So you could now use Go v1.8.5 directly. WDYT?

So you just have to use

ENV GO_VERSION 1.8.5

and it will work now!

@meyskens
Copy link
Contributor Author

meyskens commented Nov 1, 2017

Oh hey that is nice! Changed the versions to 1.8.5

@douglasmiranda
Copy link

Just a feedback

I'm using Docker aarch64 on Debian Stretch for two weeks, no issues so far.

I've tried the multiarch official images;
and created some of my own;
using docker-compose (in a container);

Running now: samba file server, afp file server (netatalk), boinc.

Details: https://gist.github.com/douglasmiranda/6c78a82b71f626c8deb930bede6d7dfc

No issues, no warnings, only joy xD

@DieterReuter
Copy link

Ping @thaJeztah. Could you please 🙏 verify internally what we have to do in order to get this PR merged in the near future?
IMO this PR seems to be ready to get merged, it works great for me and @douglasmiranda as well.

@vielmetti
Copy link

reping @seemethere @andrewhsu @tianon PTAL

@thaJeztah
Copy link
Member

thaJeztah commented Dec 2, 2017

Checking 🤗

@seemethere
Copy link
Contributor

Going to squash and merge this in due to the number of commits.

Copy link
Contributor

@seemethere seemethere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seemethere seemethere merged commit 03eac42 into docker:master Dec 4, 2017
@seemethere
Copy link
Contributor

Thank you so much @meyskens and everyone else that participated in this PR, sorry for the delay but happy to get more aarch64 support up and running for the upcoming release!

@DieterReuter
Copy link

🎉woot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.